import request from '@/utils/request'

const api_name = '/admin/menu'

export default {

  findNodes() {
    return request({
      url: `${api_name}/treelist`,
      method: 'get'
    })
  },

  removeById(id) {
    return request({
      url: `${api_name}/delete`,
      method: "delete",
      params: id
    })
  },

  save(sysMenu) {
    return request({
      url: `${api_name}/create`,
      method: "post",
      data: sysMenu
    })
  },

  updateById(sysMenu) {
    return request({
      url: `${api_name}/update`,
      method: "post",
      data: sysMenu
    })
  }
  
}